Skip to content

[tests/tools] Introduce ggma_run#16270

Merged
hseok-oh merged 1 commit intoSamsung:masterfrom
glistening:ggma_run___
Nov 6, 2025
Merged

[tests/tools] Introduce ggma_run#16270
hseok-oh merged 1 commit intoSamsung:masterfrom
glistening:ggma_run___

Conversation

@glistening
Copy link
Copy Markdown
Contributor

@glistening glistening commented Nov 5, 2025

It adds ggma_run tools which uses GGMA api to generate text from given prompt.

ONE-DCO-1.0-Signed-off-by: Sanggyu Lee sg5.lee@samsung.com

$ Product/x86_64-linux.debug/out/bin/ggma_run --version
ggma_run v0.1.0 (nnfw runtime: v1.31.0)

$ Product/x86_64-linux.debug/out/bin/ggma_run tinyllama
Package Filename tinyllama
prompt: Lily picked up a flower.
generated: { 1100, 7899, 289, 826, 351, 600, 2439, 288, 266, 3653, 31843, 1100, 7899, 289, 1261, 291, 5869, 291, 1261, 31843, 1100, 7899 }
detokenized: She liked to play with her friends in the park. She liked to run and jump and run. She liked

@glistening glistening requested review from a team, chunseoklee and hseok-oh November 5, 2025 02:29
@glistening glistening added the PR/ready for review It is ready to review. Please review it. label Nov 5, 2025
Comment on lines +24 to +32
#define NNPR_ENSURE_STATUS(a) \
do \
{ \
if ((a) != NNFW_STATUS_NO_ERROR) \
{ \
exit(-1); \
} \
} while (0)

Copy link
Copy Markdown
Contributor Author

@glistening glistening Nov 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beyond this PR. (Just for recording)

The NNPR_ENSURE_STATUS definition appears in several files:

  • runtime/tests/tools/ggma_run/src/ggma_run.cc
  • runtime/tests/tools/onert_run/src/nnfw_util.h
  • runtime/tests/tools/onert_train/src/nnfw_util.h
  • runtime/tests/custom_op/FillFrom/FillFrom_runner.cc
  • runtime/contrib/style_transfer_app/src/style_transfer_app.cc

This is why I tried to define GGMA_ENSURE in ggma_macro.h. To minimize the expose API, however, we could follow the suggestion in #16260 and place it under test/tools/libs instead.

option(BUILD_XNNPACK "Build XNNPACK" OFF)

option(BUILD_GGMA_API "Build GGMA API for Generative AI" OFF)
option(BUILD_GGMA_RUN "Build ggma_run test driver" OFF)
Copy link
Copy Markdown
Contributor Author

@glistening glistening Nov 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewers, I will turn BUILD_GGMA_API and BUILD_GGMA_RUN on after sentencepiece is handled for Tizen.

@glistening glistening force-pushed the ggma_run___ branch 3 times, most recently from 20bdd26 to f30aa73 Compare November 5, 2025 03:17
It adds ggma_run tools which uses GGMA api to generate text from given
prompt.

ONE-DCO-1.0-Signed-off-by: Sanggyu Lee <sg5.lee@samsung.com>
Copy link
Copy Markdown
Contributor

@hseok-oh hseok-oh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hseok-oh
Copy link
Copy Markdown
Contributor

hseok-oh commented Nov 6, 2025

@chunseoklee is out of office until 11/13

@hseok-oh hseok-oh merged commit 75b6afd into Samsung:master Nov 6, 2025
10 checks passed
@glistening glistening deleted the ggma_run___ branch November 7, 2025 04:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR/ready for review It is ready to review. Please review it.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants